﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace PPI.Mobile
{
    /// <summary>
    /// Clase utilizada para representar un query N veces con N listados de parametros con distintos valores.
    /// </summary>
    public class EMobileQuery
    {
        private string m_Query;
        private bool m_HasParameters;
        private List<List<SqlParameter>> m_QueryParameters;

        #region Properties

        public string Query
        {
            get { return m_Query; }
            set { m_Query = value; }
        }

        public List<List<SqlParameter>> Parameters
        {
            get { return m_QueryParameters; }
        }

        public bool HasParameters
        {
            get { return (m_QueryParameters.Count > 0); }
        }

        #endregion

        public EMobileQuery()
        {
            m_Query = "";
            m_QueryParameters = new List<List<SqlParameter>>();
        }

        public EMobileQuery(string query)
        :this()
        {
            m_Query = query;
            
        }

        public EMobileQuery(string query, List<List<SqlParameter>> parameters)
        {
            m_Query = query;
            m_QueryParameters = parameters;
        }
    }
}
